import Vue from 'vue'
import App from './App'
import router from './router/blogRouter'
import axios from 'axios'

import {
  Icon ,
  Input ,
  Button ,
  Select ,
  Option ,
  Notification ,
  Message ,
  Pagination ,
  Radio ,
  RadioGroup ,
  RadioButton ,
  Tooltip ,
  DatePicker,
  TimeSelect ,
  TimePicker ,
  Timeline ,
  TimelineItem ,
  Card ,
  MessageBox ,
  Avatar ,
  Badge ,
} from 'element-ui';
import {message} from './assets/js/resetMessage';
import 'element-ui/lib/theme-chalk/base.css';   // fade/zoom 等
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';    // collapse 展开折叠
Vue.component(Icon.name, Icon);
Vue.component(Input.name, Input);
Vue.component(Button.name, Button);
Vue.component(Select.name, Select);
Vue.component(Option.name, Option);
Vue.component(Option.name, Option);
Vue.component(Radio.name, Radio);
Vue.component(RadioGroup.name, RadioGroup);
Vue.component(RadioButton.name, RadioButton);
Vue.component(Pagination.name, Pagination);
Vue.component(Tooltip.name, Tooltip);
Vue.component(DatePicker.name, DatePicker);
Vue.component(TimeSelect.name, TimeSelect);
Vue.component(TimePicker.name, TimePicker);
Vue.component(Timeline.name, Timeline);
Vue.component(TimelineItem.name, TimelineItem);
Vue.component(Card.name, Card);
Vue.component(MessageBox.name, MessageBox);
Vue.component(Avatar.name, Avatar);
Vue.component(Badge.name, Badge);
Vue.component(CollapseTransition.name, CollapseTransition);

Vue.prototype.$axios=axios;
Vue.prototype.$notify = Notification;
Vue.prototype.$message = Message;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$message = message; //重写message提示框  一定要放在Vue.use(ElementUI)之后
Vue.config.productionTip = false;

new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
});
